<script type="text/javascript">
$(document).ready(function(){
	$("#edtior").on("click",function(){
		var id = $("input[name='id']").val();
		var fjd_id = $("#companyId").find("option:selected").val();
		var name = $("input[name='name']").val();
		var introduction = $("textarea[name='introduction']").val();
		var code = $("input[name='code']").val();
		var address = $("input[name='address']").val();
		var liable_peoper = $("input[name='liable_peoper']").val();
		var grade = $("input[name='grade']").val();
		
		$.post("${path}/company/editor",{
			id:id,
			name:name,
			introduction:introduction,
			fjd_id:fjd_id,
			code:code,
			address:address,
			liable_peoper:liable_peoper,
			grade:grade
		},function(data){
			if(data.success){
				window.location.href="${path}/company/list";
			}
		});
	})
});
</script>
<div>
	<input  type="hidden" name="id" value="${map.company.id}">
	单位名称:<input name="name" value="${map.company.name}"><br/>
	单位简介:
	#if($map.company.introduction)
		<textarea name="introduction">${map.company.introduction}</textarea>
	#else 
		<textarea name="introduction"></textarea><br/>
	#end<br/>
	单位代码:
	#if($map.company.code)
		<input name="code" value="${map.company.code}">
	#else 
		<input name="code" value="">
	#end<br/>
	单位级别:
	#if($map.company.grade)
		<input name="grade" value="${map.company.grade}">
	#else 
		<input name="grade" value="">
	#end<br/>
	上级单位:
	<select id="companyId" name="">
	     <option value=" " >请选择</option>
	     #foreach ($item in $map.list)
	        <option value="${item.id}" #if($map.company.id == $item.id) selected="selected" #end> ${item.name}</option>
		  #end 
	</select><br/>
	单位地址:
	#if($map.company.address)
		<input name="address" value="${map.company.address}">
	#else 
		<input name="address" value="">
	#end<br/>
	单位负责人:
	#if($map.company.liable_peoper)
		<input name="liable_peoper" value="${map.company.liable_peoper}">
	#else 
		<input name="liable_peoper" value="">
	#end<br/>
	<button id="edtior">修改</button>
</div>